# 1.算术运算符
"""
# 取余
print(8 % 3)  # 2
# 判断一个数字是否能被整除
# print(2024 % 4)
# 取商
print(7 // 2)  # 3
# 次方/次幂
print(5 ** 3)

# 2.比较运算符
print(3 > 1,  5 >= 7)
print(2 == 2)
print(2 == '2', 2 != '2')
# 字符串之间，比较的是字符的编码
# ascii码  Unicode码
# 0 -> 47  A > 65  a -> 97
print('A' > '0', 'A' > 'a')

# 3.逻辑运算符
age = 8
# 逻辑与: 判断一个年龄是否在18~60之间
# print(age >= 18 and age <= 60)
# print(18 <= age <= 60)
# 逻辑或： 判断一个人的年龄是否在60以上，或者12以下
print(age > 60 or age < 12)
print(not 12 <= age <= 60)
# 逻辑非
# print(not True, not False)


total = 800
# 打8折, 先执行乘法运算，再赋值
# total = total * 0.8
# 运算赋值
total *= 0.8
print(total)

total2 = 320
# total2 = total2 - 50
total2 -= 50
print(total2)
"""
# 成员运算符
print('a' in 'hello world')
print('o' in 'hello world')
print('world' in 'hello world')
print('tedu' not in 'hello world')






